package com.kj.gitwe.controller;

import com.kj.gitwe.bean.User;
import com.kj.gitwe.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @author LQWQK
 * @version 1.0
 * @since 2023-05-13 18:58:13
 */
@Controller
public class UserController {
    @Autowired
    private UserService userService;

    Random random = new Random();

    @RequestMapping("/user/selectId")
    @ResponseBody
    public Object selectId(String id) {
        int ret = userService.queryUserById(id);
        int a = 4;
        return ret;
    }

    @RequestMapping("/user/all")
    @ResponseBody
    public List<User> all(String id) {
        List<User> users = new ArrayList<>();
        return users;
    }


}
